<?php
namespace Users\Model;

class GroupChat
{
    protected $id;
    protected $user_id;
    protected $message;
    protected $stamp;
    
    public function getId() {
        return $this->id;
    }

    public function getUser_id() {
        return $this->user_id;
    }

    public function getMessage() {
        return $this->message;
    }

    public function getStamp() {
        return $this->stamp;
    }

    public function setId($id) {
        $this->id = $id;
    }

    public function setUser_id($user_id) {
        $this->user_id = $user_id;
    }

    public function setMessage($message) {
        $this->message = $message;
    }

    public function setStamp($stamp) {
        $this->stamp = $stamp;
    }
    
    function exchangeArray($data)
    {
        $this->id = (isset($data['id'])) ?
        $data['id'] : null;
        
        $this->user_id = (isset($data['user_id'])) ?
        $data['user_id'] : null;
        $this->message = (isset($data['message'])) ?
        $data['message'] : null;
        $this->stamp = (isset($data['stamp'])) ?
        $data['stamp'] : null;
    }

}